﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Model;
using BusinnessLogic;
using DataLayer;

namespace scrumbench
{
    public partial class ImpedimentDetailsForm : Form
    {
        private int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        public ImpedimentDetailsForm()
        {
            InitializeComponent();
        }

        public ImpedimentDetailsForm(int Id)
        {
            InitializeComponent();
            this.id = Id;
        }

        private void FillBoxes(object sender, EventArgs e)
        {   
            //Details invullen 
            List<Impediments> FillBoxes = new List<Impediments>();
            ImpedimentsManage fill = new ImpedimentsManage();
            FillBoxes = fill.DetailList(this.id);

            foreach (Impediments ImpDetails in FillBoxes)
            {
                OwnerBox.Text = ImpDetails.Username;
                ProductBox.Text = ImpDetails.Product;
                SprintBox.Text = ImpDetails.Sprint;
                UserStoryBox.Text = ImpDetails.Userstory;
                Taskbox.Text = ImpDetails.Task;
                Titelbox.Text = ImpDetails.titel;
                CommentBox.Text = ImpDetails.description;
            }


        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        
        

    }
}
